Avoiding “Deaths by PowerPoint” Data Storytelling and Python to the rescue Sebastián Flores, PyCon US 2024, May 18th
Death by PowerPoint (noun):
A painful experience caused by a long, boring presentation with too many slides filled with text, small fonts, and endless bullet points. Common symptoms include sleepy eyes, yawning, and a strong desire to escape.
Example: “After an hour, I felt like I was dying by PowerPoint.”
(See also: meeting purgatory, presentation torture)
About me
Sebastián Flores aka sebastiandres
Member of Python Chile
Collaborator to Streamlit and Vizzu
Chief Data Officer at uPlanner
Agenda
No
Nope
No chance
Storytelling principle #1:
Never give away the ending!
Always raise the stakes!
Data Storytelling
Why Data Storytelling?
¿Storytelling?
Stories are
the first human technology
Ohh, those hackable brains
Peak-End Rule Image by sketplanation
Game of Thrones rating, by Kelvin Neo
Data Storytelling:
Using storytelling tricks to create presentations that will be remembered and that create impact
Emotions create actions
The best example
How to make millions of people share statistics on social media?
Data Storytelling
Tool #1: Visualization
Data Exploratory Viz
Too many options! User cannot be responsible of finding your insights.
Storytelling principle #2:
Details are important,
but not all details are important.
Data Explanatory Viz
So many good python libraries!
Classic: Matplotlib
Rising starts: Seaborn, Plotly, Altair
Other: plotnine, pygal, bokeh
Pick one and master it
Don’t share numbers. Share a story.
(C) Storytelling with Data, por Cole Nussbaumer Knaflic.
Vizzu
A Data Storytelling library in JS & Python
Show the code
import pandas as pdfrom ipyvizzu import Data, Config, Stylefrom ipyvizzustory import Story, Slide, Step# Import the datedf = pd.read_excel("./data/python_conference.xlsx", dtype={"year": str, "location": str, "attendees": int, "type":str})# Create story object, add data to itdata = Data()data.add_df(df)story = Story(data=data)# Set the size of the HTML element and activate tooltipstory.set_size("100%", "400px")story.set_feature("tooltip", True)# Each slide here is a page in the final interactive storyslide1 = Slide( Step( Config.stackedColumn( {"x": "year","y": "attendees","title": "Pycon Attendees", } ), Style({"plot": {"xAxis": {"label": {"angle": 2.0}}}}), ))story.add_slide(slide1)# Each slide here is a page in the final interactive storyslide2 = Slide( Step( Config.stackedColumn( {"x": "year","y": "attendees","stackedBy": "type","title": "Pycon Attendees", } ), Style({"plot": {"xAxis": {"label": {"angle": 2.0}}}}), ))story.add_slide(slide2)# Each slide here is a page in the final interactive storyslide3 = Slide( Step( Config.stackedColumn( {"x": "year","y": "attendees","stackedBy": "type","title": "Pycon Attendees", } ), Style({"plot": {"xAxis": {"label": {"angle": 2.0}}}}), ))story.add_slide(slide3)# Percentagesslide3 = Slide( Step( Config.percentageColumn( {"x": "year","y": "attendees","stackedBy": "type", } ), ))story.add_slide(slide3)# Play the created story!story.play()
Data Storytelling
Tool #2: AI
Storytelling principle #3:
Your first draft is always going to be terrible.
Use AI chatbots for:
Analogies and examples
Prompts to create better images!
Don’t search for images, create them!
Data Storytelling
Tool #3: Presentation
Storytelling principle #4:
Show, don’t tell.
Show, don’t tell.
Guido’s eyes lit up as the terminal finally executed without errors. A wide grin spread across his face. He jumped up from his chair, fists raised in triumph. “Yes!” he exclaimed, as he savored the moment of triumph with a deep, contented sigh.
Guido was happy because he solved the bug on his code.
An open-source scientific and technical publishing system.
Focus on scientific markdown, dynamic & interactive documents based on code (Python/R/Julia).
https://quarto.org/
Code
---
title: "Habits"
author: "John Doe"
format:
revealjs:
transition: fade
theme: black
toc: true
center: true
---
## Getting up
- Turn off alarm
- Get out of bed
---
## Going to sleep
::: { .incremental }
- Get in bed
- Count sheep
:::
Slides
Jupyter + RISE
Jupyter plugin to display notebooks as revealjs slides.
https://rise.readthedocs.io/
Jupyter + RISE
Streamlit
All python and as interactive as you can to code it…